package 设计模式.观察者;

import javafx.concurrent.Task;
import org.junit.Test;
import 设计模式.原型.浅克隆.ConcretePrototype;

public class TestCustomer {

    @Test
    public void test01(){
        // 创建两个任务
        Task1ObServer task1 = new Task1ObServer();
        Task2ObServer task2 = new Task2ObServer();

        // 创建主题角色，并添加两个观察者;
        ConcreteSubject subject = new ConcreteSubject();
        subject.registerObServer(task1);
        subject.registerObServer(task2);
        subject.notifyAllObServer();
    }
}
